\hypertarget{group__bvh}{
\section{\-Bounding \-Volume \-Hierarchies}
\label{group__bvh}\index{\-Bounding Volume Hierarchies@{\-Bounding Volume Hierarchies}}
}
\subsection*{\-Classes}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{structnih_1_1cuda_1_1_binned__sah__builder}{nih\-::cuda\-::\-Binned\-\_\-sah\-\_\-builder}
\item 
struct \hyperlink{structnih_1_1cuda_1_1_l_b_v_h__builder}{nih\-::cuda\-::\-L\-B\-V\-H\-\_\-builder$<$ Integer $>$}
\item 
struct \hyperlink{structnih_1_1cuda_1_1bvh__packing__functor}{nih\-::cuda\-::bvh\-\_\-packing\-\_\-functor}
\item 
struct \hyperlink{structnih_1_1cuda_1_1_sah__builder}{nih\-::cuda\-::\-Sah\-\_\-builder}
\begin{DoxyCompactList}\small\item\em \-G\-P\-U-\/based \-S\-A\-H \-B\-V\-H builder. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{\-Functions}
\begin{DoxyCompactItemize}
\item 
{\footnotesize template$<$typename Node\-\_\-iterator , typename Bbox\-\_\-iterator , typename Output\-\_\-iterator $>$ }\\void \hyperlink{group__bvh_ga6e090f607737d9e380e3f2cc04bca282}{nih\-::cuda\-::pack} (const uint32 n\-\_\-nodes, \-Node\-\_\-iterator nodes, \-Bbox\-\_\-iterator bboxes, \-Output\-\_\-iterator packed\-\_\-nodes)
\end{DoxyCompactItemize}


\subsection{\-Function \-Documentation}
\hypertarget{group__bvh_ga6e090f607737d9e380e3f2cc04bca282}{
\index{\-Bounding Volume Hierarchies@{\-Bounding Volume Hierarchies}!pack@{pack}}
\index{pack@{pack}!Bounding Volume Hierarchies@{\-Bounding Volume Hierarchies}}
\subsubsection[{pack}]{\setlength{\rightskip}{0pt plus 5cm}template$<$typename Node\-\_\-iterator , typename Bbox\-\_\-iterator , typename Output\-\_\-iterator $>$ void nih\-::cuda\-::pack (
\begin{DoxyParamCaption}
\item[{const uint32}]{n\-\_\-nodes, }
\item[{\-Node\-\_\-iterator}]{nodes, }
\item[{\-Bbox\-\_\-iterator}]{bboxes, }
\item[{\-Output\-\_\-iterator}]{packed\-\_\-nodes}
\end{DoxyParamCaption}
)}}
\label{group__bvh_ga6e090f607737d9e380e3f2cc04bca282}
\-Pack a set of bvh nodes and their bboxes into a single set of (4d) bboxes. \-The input and output bbox arrays can be the same.


\begin{DoxyParams}{\-Parameters}
{\em n\-\_\-nodes} & node count \\
\hline
{\em nodes} & input nodes \\
\hline
{\em bboxes} & input bboxes \\
\hline
{\em packed\-\_\-nodes} & output bboxes\\
\hline
\end{DoxyParams}
\-The following code snipped illustrates an example usage\-:


\begin{DoxyCode}
 thrust::device_vector<Bvh_node> bvh_nodes;
 thrust::device_vector<Bbox4f>   bvh_bboxes;
 uint32 node_count;
 ... // build a bvh and compute its bboxes here

 // pack the bvh
 cuda::pack(
     node_count,
     bvh_nodes.begin(),
     bvh_bboxes.begin(),
     bvh_bboxes.begin() );
\end{DoxyCode}
 